Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add HTMLImageElement for Material uniform #5857

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,6 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
* [Rudraksha Shah](https://github.com/Rudraksha20)
* [Cody Guldner](https://github.com/burn123)
* [Nacho Carnicero](https://github.com/nacho-carnicero)
* [LIU Liang](https://github.com/polluxll)
* [Y.Selim Abidin](https://github.com/SelimAbidin)

8 changes: 4 additions & 4 deletions Documentation/Contributors/CLAs/corporate-cla-agi-v1.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ Please send complete forms to [email protected].
Please read this document carefully before signing and keep a copy
for your records.

Corporation name: ________________________________________________
Corporation name: 3Clear Science and Technology Co.,Ltd.__________

Corporation address: ________________________________________________
Corporation address: 200 Qingyang Road,Chengguan District,Lanzhou City,

________________________________________________
Gansu Province,China,___________________________

________________________________________________
730000__________________________________________

Point of Contact: ________________________________________________

Expand Down
16 changes: 8 additions & 8 deletions Documentation/Contributors/CLAs/individual-cla-agi-v1.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ Please send complete forms to [email protected].
Please read this document carefully before signing and keep a copy
for your records.

Full name: ______________________________________________________
Full name: LIU Liang_____________________________________________

Mailing Address: ________________________________________________
Mailing Address: 200 Qingyang Road,Chengguan District,Lanzhou City,

________________________________________________
Gansu Province,China,730000_____________________

Country: ______________________________________________________
Country: China_________________________________________________

Telephone: ______________________________________________________
Telephone: 86+13619330072________________________________________

E-Mail: ______________________________________________________
E-Mail: [email protected]______________________________

GitHub username: ________________________________________________
GitHub username: polluxll________________________________________

You accept and agree to the following terms and conditions for Your
present and future Contributions submitted to AGI. Except for the
Expand Down Expand Up @@ -124,4 +124,4 @@ Contributions.

Sign by typing your full name.

Please sign: __________________________________ Date: ________________
Please sign: LIU Liang__________________________ Date: 2017-09-23_______
7 changes: 6 additions & 1 deletion Source/Scene/Material.js
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,11 @@ define([
id : uniformId,
image : uniformValue
});
}else if(uniformValue instanceof HTMLImageElement){
material._loadedImages.push({
id : uniformId,
image : uniformValue
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this block is a duplicate of the HTMLCanvasElement case, can we just add and additional or for HTMLImageElement?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@polluxll Please address this comment when you have a minute. Thanks!

});
}

material._texturePaths[uniformId] = uniformValue;
Expand Down Expand Up @@ -964,7 +969,7 @@ define([
uniformType = 'float';
} else if (type === 'boolean') {
uniformType = 'bool';
} else if (type === 'string' || uniformValue instanceof HTMLCanvasElement) {
} else if (type === 'string' || uniformValue instanceof HTMLCanvasElement || uniformValue instanceof HTMLImageElement) {
if (/^([rgba]){1,4}$/i.test(uniformValue)) {
uniformType = 'channels';
} else if (uniformValue === Material.DefaultCubeMapId) {
Expand Down
2 changes: 1 addition & 1 deletion Source/Widgets/SceneModePicker/SceneModePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sc
attr: { title: tooltipColumbusView },\
click: morphToColumbusView,\
cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }');
wrapper.appendChild(morphToCVButton);
//wrapper.appendChild(morphToCVButton); Modify date:Oct.13th,2017

knockout.applyBindings(viewModel, wrapper);

Expand Down