PageSourceSearch

https://starwarsdatabase.com/gallery/src/pedestal.js?v=0.67.1

js starwarsdatabase.com collected 2026-10-07 19:30:56 UTC 2,990 bytes, 46 lines download raw bytes

1import {fixtureObstacle} from './fixture-profile.js?v=0.67.1';
2import * as THREE from '../assets/vendor/three.module.js';
3import {itemTitle} from './display-plan.js?v=0.67.1';
4
5// A protective plinth and glass hood around an intact study photograph.
6// The photographed object, packaging and any companion pieces stay together.
7export function pedestalCase(room,unit,x,z,facing=0){
8  const m=room.materials,group=new THREE.Group(),item=unit.items[0];
9  group.position.set(x,0,z);group.rotation.y=facing;group.userData.fixtureType='pedestal';room.root.add(group);
10  room.box(1.56,.10,1.28,0,.10,0,m.dark,group);
11  room.box(1.44,.025,1.16,0,.165,0,m.bronze,group);
12  room.box(1.40,.61,1.12,0,.475,0,m.frame,group);
13  for(const side of [-1,1])room.box(.018,.56,.012,side*.665,.47,.565,m.frameInner,group);
14  room.box(1.52,.065,1.24,0,.81,0,m.lightHousing,group);
15  const counter=room.box(1.46,.04,1.18,0,.865,0,m.liner,group);
16
17  // Slim hood edges stay outside the entire photograph, not just its centre.
18  const bottom=.90,top=2.60,height=top-bottom;
19  for(const side of [-1,1]){
20    for(const depth of [-.48,.48])room.box(.024,height,.024,side*.69,(top+bottom)/2,depth,m.plaqueMetal,group);
21    const pane=room.box(.008,height-.03,.94,side*.686,(top+bottom)/2,0,m.cabinetDivider,group);
22    pane.castShadow=false;pane.userData.pedestalSide=true;
23  }
24  for(const y of [bottom,top]){
25    for(const depth of [-.48,.48])room.box(1.40,.025,.025,0,y,depth,m.plaqueMetal,group);
26    for(const side of [-1,1])room.box(.025,.025,.96,side*.69,y,0,m.plaqueMetal,group);
27  }
28  const glass=room.box(1.35,height-.035,.008,0,(top+bottom)/2,.48,m.glass,group);
29  glass.userData.pedestalGlazing=true;
30  room.box(1.35,height-.035,.008,0,(top+bottom)/2,-.48,m.glass,group);
31  const lid=room.box(1.35,.008,.94,0,top,0,m.glass,group);
32  lid.userData.pedestalGlazing=true;
33  const rear=room.box(1.27,1.52,.025,0,1.72,-.338,m.dark,group);
34  const backing=room.box(1.24,1.50,.018,0,1.72,-.316,m.liner,group);
35  room.box(1.23,.04,.13,0,2.545,-.23,m.lightHousing,group);
36  const lamp=room.box(1.12,.012,.075,0,2.519,-.215,m.light,group);
37  const photograph=room.photo(item,1.16,1.42,0,1.72,-.303,group,{muted:true,backings:[backing,rear],bottom:.889,onUnavailable:()=>{backing.material=m.unlitLiner;counter.material=m.unlitLiner;lamp.material=m.unlitLamp;}});
38  photograph.userData.pedestalItem=item.id;
39  room.fixturePlacard(unit,1.32,0,.405,.585,group);
40  const cutout=item.imageTreatment===true;
41  const title=room.label(itemTitle(item),cutout?.95:1.31,.145,cutout?-.18:0,.735,.635,{size:60,color:'#f1e6cc',background:'#34434c'},group);
42  room.clickable(title,()=>room.callbacks.inspect(item.id),itemTitle(item));
43  room.photoPlaque(item,.30,.068,cutout?.505:.42,cutout?.735:.948,cutout?.64:.501,group);
44  room.obstacles.push(fixtureObstacle(unit,x,z,facing));room.registerDestination(unit,group);
45  const state={group,item,backing,counter,lamp,photograph,glass};(room.pedestals??=[]).push(state);return state;
46}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.