content/hifi-public/sam/hack/overnight/creatVolumejs.js
Dale Glass 0d14e5a379 Initial data.
Needs a lot of cleanup. Data has been de-duplicated, and where identical copies existed, one of them
has been replaced with a symlink.

Some files have been excluded, such as binaries, installers and debug dumps. Some of that may still
be present.
2022-02-13 18:59:11 +01:00

36 lines
861 B
JavaScript

var rotation = Quat.safeEulerAngles(Camera.getOrientation());
rotation = Quat.fromPitchYawRollDegrees(0, rotation.y, 0);
var center = Vec3.sum(MyAvatar.position, Vec3.multiply(6, Quat.getFront(rotation)));
var proceduralJSON = {
"ProceduralEntity": {
"version":2,
"shaderUrl":"file:///Users/sam/Desktop/hack/hack0.fs",
"uniforms":{
"iChannel0":"http://demos.vicomtech.org/volren/aorta-high.jpg",
"iSize": [1.0, 2.0, 4.0]}
}
}
var theUserData = JSON.stringify(proceduralJSON);
var volumeEntity = Entities.addEntity({
name: 'VolumeEntity',
dimensions: {
x: 10,
y: 10,
z: 10
},
type: 'Box',
position: center,
color: {
red: 255,
green: 255,
blue: 255
},
visible: true,
collisionless: true,
userData: theUserData
});