[x3d-public] ImageTexture width/height_changed

Holger Seelig holger.seelig at googlemail.com
Tue Dec 4 07:55:31 PST 2018


The access type must be, of course, outputOnly. It's just a typo.

HTML5 uses <img> and <video> element to display media, which is also 
used by X_ITE and will likely be used by X3DOM. The <img> element has a 
Image.width and Image.height property and the <video> element has a 
Video.videoWidth and Video.videoHeight property which can be used to 
fill the new output fields.

https://dev.w3.org/html5/pf-summary/Overview.html#the-img-element
https://dev.w3.org/html5/pf-summary/Overview.html#video

The new fields are propably best placed in the nodes I described, 
because the values do occur there.


On 03.12.2018 13:49, Brutzman, Donald (Don) (CIV) wrote:
> Thanks for the excellent suggestion Holger.  Here are a few more reactions.
> 
> Using accessType outputOnly likely makes sense because they are intrinsic property of the media that gets loaded.  Note that width and height themselves are not set by an X3D author, rather the imagery is placed on top of some separately sized geometry.
> 
> Knowing width and height values is definitely helpful to an X3D author, among other things it allows determination of image resolution.  Perhaps aspectRatio should also be included as an outputOnly event since it is easy for the browser to compute.
> 
> We would do well to look at HTML5/CSS web authoring and how such values are used there.  They won't be symmetric use cases (since an HTML author can reset width/height) but it will be good to encourage HTML5/X3D event passing in ways that are natural to HTML authors.
> 
> Am expecting that these belong in X3DTexture2DNode (along with repeatS and repeatT) but we should also look at TextureProperties as a possibility.
> * 18.3.3 X3DTexture2DNode
>     http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/texturing.html#X3DTexture2DNode
> 
> * 18.4.9 TextureProperties
>     http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/texturing.html#TextureProperties
> 
> Request: who wants to draft candidate specification prose?  We can consider it during an X3D Working Group teleconference and then add it to the draft X3Dv4 specification on github.  One or two small examples (X3D-only use, X3D+HTML5 use) will also be welcome.
> 
> Once crafted/drafted/discussed, we can enter the change summary into a Mantis issue and then the draft specification.  Onward we go.
> 
> On 12/2/2018 8:11 AM, Holger Seelig wrote:
>> An ImageTexture loads the texture from file and it is currently not clear for X3D authors if they load the image from unkown origin, for instance from the Internet, or if the url changes dynamically, what width/height the texture has.
>>
>> I suggest to add two new field:
>>
>> ImageTexture {
>>     ...
>>     SFInt32 [] width_changed
>>     SFInt32 [] height_changed
>> }
>>
>> This follows the same layout as the AudioClip node has with its duration_changed field.
>>
>> For completeness also MovieTexture and ImageTexture3D should have these fields.
>>
>> MovieTexture {
>>     ...
>>     SFInt32 [] width_changed
>>     SFInt32 [] height_changed
>> }
>>
>> ImageTexture3D {
>>     ...
>>     SFInt32 [] width_changed
>>     SFInt32 [] height_changed
>>     SFInt32 [] depth_changed
>> }
>>
>> Maybe also ImageCubeMapTexture should have such field, which needs to be defined.
>>
> 
> 
> all the best, Don
> 


-- 
Holger Seelig
Digital Media Designer

Scheffelstraße 31a
04277 Leipzig
Germany

Cellular: +49 176 420 479 37
E-Mail:   holger.seelig at create3000.de
Web:      http://create3000.de



More information about the x3d-public mailing list