repo: janusweb action: commit revision: path_from: revision_from: ef666c453aeeb1d87f28d72006081123c0c2d568: path_to: revision_to:
commit ef666c453aeeb1d87f28d72006081123c0c2d568 Author: James BaicoianuDate: Thu Oct 22 13:19:09 2020 -0700 alphamap_id and sbs/ou3d texture fixes diff --git a/scripts/object.js b/scripts/object.js
--- a/scripts/object.js
+++ b/scripts/object.js
@@ -386,16 +386,35 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
elation.events.add(textureBump, 'update', elation.bind(this, this.refresh));
}
if (bumptextureasset.sbs3d) {
- textureBump.repeat.x = 0.5;
- }
- if (bumptextureasset.ou3d) {
- textureBump.repeat.y = 0.5;
+ textureBump.repeat.set(0.5, 1);
+ } else if (bumptextureasset.ou3d) {
+ textureBump.repeat.set(1, 0.5);
+ } else {
+ textureBump.repeat.set(1, 1);
}
if (textureBump) {
//this.assignTextureParameters(textureNormal, modelasset, textureasset);
}
}
}
+ if (alpha_image_id) {
+ let alphatextureasset = this.getAsset('image', alpha_image_id, true);
+ if (alphatextureasset) {
+ textureAlpha = alphatextureasset.getInstance();
+ if (!this.assetloadhandlers[alpha_image_id]) {
+ this.assetloadhandlers[alpha_image_id] = true;
+ elation.events.add(alphatextureasset, 'asset_load', elation.bind(this, this.refresh));
+ elation.events.add(textureAlpha, 'update', elation.bind(this, this.refresh));
+ }
+ if (alphatextureasset.sbs3d) {
+ textureAlpha.repeat.set(0.5, 1);
+ } else if (alphatextureasset.ou3d) {
+ textureAlpha.repeat.set(1, 0.5);
+ } else {
+ textureAlpha.repeat.set(1, 1);
+ }
+ }
+ }
if (displacement_image_id) {
let displacementtextureasset = this.getAsset('image', displacement_image_id, true);
if (!displacementtextureasset) { // no image found, try video
-----END OF PAGE-----